package com.wsc.wscbirthdaykeeper.activities.base;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;

import com.wsc.wscbirthdaykeeper.app.KFrontManager;
import com.wsc.wscbirthdaykeeper.model.KModel;
import com.wsc.wscbirthdaykeeper.model.KRuntimeModel;
import com.wsc.wscbirthdaykeeper.utils.DialogUtils;

public abstract class BaseActivity extends Activity {
	public KFrontManager controller = KFrontManager.getInstance();

	protected KRuntimeModel runtime = KRuntimeModel.getInstance();
	protected KModel model = KModel.getInstance();

	private static Handler handler = new Handler();

	protected Handler getHander() {
		return handler;
	}

	public void showException(final Exception e) {
		DialogUtils.showException(BaseActivity.this, e);
	}
	
	public void initComponents() {
	}

	public void initValues() {

	}

	public void initListeners() {

	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		initComponents();
		initValues();
		initListeners();
	}

	@Override
	public void onBackPressed() {
		super.onBackPressed();
	}
}
